1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method and a storage medium.
2. Related Background Art
Roughly three different technique types are employed to extract a specific object from an image:
1. the object extraction type, for sequentially selecting areas having the same density or the same color using an area division method that employs the color tones of an image, the texture (pattern) and color information, and for extracting an object from each area.
2. the outline tracing type, whereby an operator sequentially traces the outline of an object and extracts the object along a tracing locus, whereby an edge is detected in the vicinity of the tracing locus and an object is extracted along the edge, or whereby an operator enters dots at necessary points along the outline of an object and extracts the object by connecting the points with straight lines or by detecting the edge.
3. the enclosure line type, for using a line to enclose an object and to authenticate a parameter for defining the enclosure line, and for repeatedly making trial adjustments to adjust the parameter until the enclosure line adheres to the object.
In type 1 (the area base type) in the prior art, an area that has the same density, the same texture or the same color as the designated area is selected, regardless of the outline of an object. Thus, although one part of the selected area may match the outline of an object to be extracted, there tends to be a remaining part that is not matched. In this case, the results of the process can not be employed.
When, for example, to delete the background of an object an arbitrary point (or a small area) is designated in the background, an area is formed that is regarded as having the same density or the same color as the designated point or the small area. If, however, the area having the same density or the same color is extended and enters the object, the results of the process can not be employed. In this case, the permissible range for an area having the same density and the same color must be set again, or the position of the point or the small area that is designated must be changed and the area re-selected.
The optimal setup for the permissible range for determining an area having the same density or the same color requires an experienced operator and the performance of repeated trials, which places a great load on the operator. In addition, in many cases the outline of an object does not completely match the boundary of the selected area according to which the permissible range is set. Therefore, the employment of a permissible range is limited to images having a flat background, or to an object having the same density or a single color.
In type 2 (the tracing type) in the prior art, generally, a pointing device, such as a mouse, is employed to trace the outline of an object, or dots are formed at necessary points to establish the outline. When the forming of dots is employed, for example, two sequential dots are regarded as a pair, and once this extraction process has been initiated, it must be continued, regardless of whether the object can be extracted, because the apparatus will not acknowledge the extraction process has been completed until the procedure has returned to the point that was first designated.
Similarly, to trace the outline of the object using a tool having a specific width (e.g., a large pen or a brush), an operator, while completing the extraction of the object, must be very careful to fit the outline of the object inside the area described by the width of the tool. This, too, places a great load on the operator.
In type 3 (the enclosure line type) in the prior art, as in type 1, an operator must persistently and repeatedly employ trials to set a parameter and produce an enclosure line, until the enclosure line fully corresponds to the outline of the object. Since depending on the part of an object the correct parameter will differ, even if one part of the enclosure line matches the outline of the object, an overall match can not be acquired, and a desired outline can not be extracted. In addition, this method is hard to apply for an image that includes a complicated background.